/*
 *   Copyright (c) 2010-2022, SIUFUNG
 */
package net.siufung.market.base.dept.controller.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;
import net.siufung.core.utils.CopyUtil;
import net.siufung.market.base.dept.mapper.entity.Dept;

import java.io.Serializable;

/**
 * <p>
 * 系统部门 默认数据传参对象
 * </p>
 * @author 陈建峰
 * @since 2022-08-02 16:13:39
 */
@Slf4j
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="DeptDto", description="系统部门默认数据传输对象")
public class DeptDto implements Serializable {

    private static final long serialVersionUID = -6161363606891964164L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    private String id;

    /**
     * 部门名称
     */
    @ApiModelProperty(value = "部门名称")
    private String deptName;

    /**
     * 部门全称
     */
    @ApiModelProperty(value = "部门全称")
    private String deptFullName;


    /**
     * 部门编码
     */
    @ApiModelProperty(value = "部门编码")
    private String deptCode;

    /**
     * 部门类型
     */
    @ApiModelProperty(value = "部门类型")
    private String deptType;

    /**
     * 父级ID
     */
    @ApiModelProperty(value = "父级ID")
    private String parentId;

    /**
     * 等级
     */
    @ApiModelProperty(value = "等级")
    private Integer level;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sequence;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String description;

    /**
     * 租户
     */
    @ApiModelProperty(value = "租户")
    private String tenantId;

    /**
     * 转化成数据库实体
     * @return Dept
     */
    public Dept to(){
        Dept dept = new Dept();
        CopyUtil.copyProperties(this, dept);
        return dept;
    }
}